package com.hsogoo.avatar.transport;

import com.hsogoo.avatar.model.AvatarRequest;
import com.hsogoo.avatar.model.AvatarResponse;

/**
 * @Author huangsaigang
 * Created @2018/9/26.
 */
public interface AvatarProcessor {

    /**
     * 处理请求
     * @param request
     * @return
     */
    void processRequest(AvatarChannel channel, AvatarRequest request) throws Exception;

    /**
     * 处理响应
     * @param response
     * @return
     */
    void processResponse(AvatarResponse response) throws Exception;

    /**
     * 处理异常
     * @param request
     * @param t
     * @return
     */
    void processException(AvatarChannel channel, AvatarRequest request, Throwable t) throws Exception;


}
